package tj.eskhata.pos.dao;

import java.util.List;

import org.hibernate.criterion.Criterion;
import org.springframework.transaction.annotation.Transactional;

import tj.eskhata.pos.web.model.DomainObjectModel;
import tj.eskhata.pos.domain.Acc;
import tj.eskhata.pos.domain.DomainObject;

public interface Dao<T extends DomainObject> {

  @Transactional
  void delete(T o);

  T load(long id);

  @Transactional
  void save(T o);

  List<T> findAll();
  List<T> findAll(String order);
  List<T> findByCriteria(Criterion... criterion);

  int countAll();
}
